﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MCActionRecord.aspx.cs" Inherits="OLPC_MCActionRecord" %>
<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxUploadControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxTabControl" TagPrefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.1, Version=11.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v11.1, Version=11.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxClasses" tagprefix="dx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>收款操作记录查询</title>
    <link href="../Styles/main.css" rel="Stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript" src="../Jscript/common.js"></script>
</head>
<body>
    <form id="form1" runat="server"><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div id="headlocation" class="headlocation">
            <asp:Label ID="lblLocation" runat="server" Text="当前位置"></asp:Label>
            <img alt="当前位置" src="../Image/weizhi.gif" />>>
            <asp:Label ID="Label1" runat="server" Text="收款操作记录"></asp:Label>
        </div>
        <asp:UpdatePanel ID="udp" runat="server">
            <ContentTemplate>
                <asp:UpdateProgress ID="UpdateProgress3" runat="server">    
                    <ProgressTemplate>
                        <div style="text-align:center; width:100%;"><span style="font-size:16px; color:Blue;">Data Loading..... </span></div>             
                    </ProgressTemplate>
                </asp:UpdateProgress>  
                <dx:ASPxPageControl ID="tc" runat="server" ActiveTabIndex="0" 
                    CssFilePath="~/App_Themes/Aqua/{0}/styles.css" CssPostfix="Aqua"
                    SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css" TabSpacing="3px" 
                    Width="100%">
                    <TabPages>
                        <dx:TabPage Name="tabmcinformation" Text="收款操作记录">                       
                            <ContentCollection>
                                <dx:ContentControl ID="ccdelivery" runat="server">                                
                                    <div style="padding:5px 10px 5px 10px;">
                                        <dx:ASPxGridView ID="gvimported" runat="server" ClientInstanceName="gvimported" Width="100%" 
                                            KeyFieldName="AccountStatementItemRecordID"
                                            AutoGenerateColumns="False" 
                                            OnAfterPerformCallback="gvimported_AfterPerformCallback" 
                                            OnRowCommand="gvimported_RowCommand">
                                            <Columns>
                                                <dx:GridViewDataColumn Caption="删除" Width="40px" FixedStyle="Left">
                                                    <DataItemTemplate>
                                                        <asp:ImageButton ID="imgbtnDelete" runat="server" AlternateText="删除"
                                                            CommandArgument='<%# Eval("AccountStatementItemRecordID") %>' CommandName="delete"
                                                            ImageUrl="../Image/del.gif" 
                                                            OnClientClick="return confirm('你确定要移除');" />
                                                    </DataItemTemplate> 
                                                    <CellStyle HorizontalAlign="Center">
                                                    </CellStyle>
                                                </dx:GridViewDataColumn>
                                                <dx:GridViewDataCheckColumn Caption="手续费" FieldName="HandlingFee" Width="50px" FixedStyle="Left">
                                                    <DataItemTemplate>
                                                        <asp:CheckBox ID="chk" runat="server"
                                                        Checked='<%# GetVisible(Convert.ToString(Eval("HandlingFee"))) %>' 
                                                        Enabled="false" />
                                                    </DataItemTemplate>
                                                    <CellStyle HorizontalAlign="Center"></CellStyle>
                                                    <PropertiesCheckEdit DisplayTextChecked="是" DisplayTextUnchecked="否">
                                                    </PropertiesCheckEdit>
                                                </dx:GridViewDataCheckColumn>
                                                <dx:GridViewDataCheckColumn Caption="已承兑" FieldName="Accepted" Width="50px" FixedStyle="Left">
                                                    <DataItemTemplate>
                                                        <asp:CheckBox ID="CheckBox1" runat="server"
                                                        Checked='<%# GetVisible(Convert.ToString(Eval("Accepted"))) %>'
                                                        Enabled="false" />
                                                    </DataItemTemplate> 
                                                    <CellStyle HorizontalAlign="Center"></CellStyle>
                                                    <PropertiesCheckEdit DisplayTextChecked="是" DisplayTextUnchecked="否">
                                                    </PropertiesCheckEdit>
                                                </dx:GridViewDataCheckColumn>
                                                <dx:GridViewDataTextColumn Caption="动作类型" FieldName="ActionTypeBC" 
                                                    Width="85px" FixedStyle="Left">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="批号" FieldName="AccountStatementCode" 
                                                    Width="120px" Visible="false">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="操作人" FieldName="showname" 
                                                    Width="150px">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataDateColumn Caption="操作时间" FieldName="UPDATEDATE" 
                                                    Width="140px" UnboundType="DateTime">
                                                    <PropertiesDateEdit DisplayFormatString="{0:yyyy-MM-dd HH:mm}" 
                                                        EditFormat="DateTime">
                                                        <CalendarProperties ClearButtonText="清空" TodayButtonText="今天">
                                                        </CalendarProperties>
                                                    </PropertiesDateEdit>
                                                </dx:GridViewDataDateColumn>
                                                <dx:GridViewDataTextColumn Caption="银行参考号" FieldName="BankReference" 
                                                    Width="150px" FixedStyle="Left">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="客户参考号" FieldName="CustomerReference" 
                                                    Visible="False">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataDateColumn Caption="起息日" FieldName="ValueDate" Width="140px" 
                                                    UnboundType="DateTime">
                                                    <PropertiesDateEdit DisplayFormatString="{0:yyyy-MM-dd}"></PropertiesDateEdit>
                                                </dx:GridViewDataDateColumn>
                                                <dx:GridViewDataDateColumn Caption="入账日期" FieldName="EntryDate" Width="140px" UnboundType="DateTime">
                                                    <Settings AutoFilterCondition="Greater" />
                                                    <PropertiesDateEdit DisplayFormatString="{0:yyyy-MM-dd}"></PropertiesDateEdit>
                                                </dx:GridViewDataDateColumn>
                                                <dx:GridViewDataTextColumn Caption="交易金额" FieldName="TransactionAmount" 
                                                    Width="120px" FixedStyle="Left" UnboundType="Decimal">
                                                    <Settings AutoFilterCondition="GreaterOrEqual" />
                                                    <PropertiesTextEdit DisplayFormatString="{0:N2}" />
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="已分配金额" FieldName="AppliedAmount" 
                                                    Width="120px" FixedStyle="Left" UnboundType="Decimal">
                                                    <Settings AutoFilterCondition="GreaterOrEqual" />
                                                    <PropertiesTextEdit DisplayFormatString="{0:N2}" />
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="剩余金额" FieldName="TransactionAmountLeft" 
                                                    Width="120px" FixedStyle="Left" UnboundType="Decimal">
                                                    <Settings AutoFilterCondition="GreaterOrEqual" />
                                                    <PropertiesTextEdit DisplayFormatString="{0:N2}" />
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="币 种" FieldName="Currency" 
                                                    Width="100px">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="产品类型" FieldName="ProductType" Width="160px">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="交易说明" FieldName="TransactionDescription" 
                                                    Width="160px">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="额外信息" FieldName="ExtraInformation" 
                                                    Width="240px">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="汇款人/开票人名称" FieldName="OrderingPartyName" 
                                                    Width="240px">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="汇款人/开票人账户" FieldName="OrderingPartyAccount" 
                                                    Width="200px">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="定购方银行名称" FieldName="OrderingPartyBankName" 
                                                    Width="300px">
                                                </dx:GridViewDataTextColumn>                                        
                                                <dx:GridViewDataTextColumn Caption="付款细节" FieldName="PaymentDetails" 
                                                    Width="220px">
                                                </dx:GridViewDataTextColumn> 
                                                <dx:GridViewDataTextColumn Caption="收款方式" FieldName="AccountsReceivable" Width="220px">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="客户名称" FieldName="CustomerName" 
                                                    Width="200px">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="出票人" FieldName="MOPerson" Width="160px">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataDateColumn Caption="到期日" FieldName="MaturityDate" Width="160px" UnboundType="DateTime">
                                                    <Settings AutoFilterCondition="Greater" />
                                                    <PropertiesDateEdit DisplayFormatString="{0:yyyy-MM-dd}"></PropertiesDateEdit>
                                                </dx:GridViewDataDateColumn>
                                                <dx:GridViewDataTextColumn Caption="公司" FieldName="CoName" Width="250px">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="状态" FieldName="StateText" Width="70px">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="状态值" FieldName="StateValue" Visible="false">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="备注" FieldName="Remarks" Visible="False">
                                                </dx:GridViewDataTextColumn>
                                            </Columns>
                                            <TotalSummary>
                                                <dx:ASPxSummaryItem FieldName="TransactionAmount" SummaryType="Sum" 
                                                    ShowInColumn="交易金额" ValueDisplayFormat="c" />
                                            </TotalSummary>
                                            <SettingsBehavior ColumnResizeMode="Control" AllowSelectByRowClick="True"></SettingsBehavior>
                                            <Settings ShowFilterRow="True" ShowGroupPanel="True"  ShowFilterRowMenu="true"
                                                ShowHorizontalScrollBar="True" VerticalScrollableHeight="22" ShowFilterBar="Visible">
                                            </Settings>
                                            <SettingsPager PageSize="10" Mode="ShowPager">
                                            </SettingsPager>
                                        </dx:ASPxGridView>
                                    </div>
                                </dx:ContentControl>
                            </ContentCollection>
                        </dx:TabPage>
                        <dx:TabPage Name="tabmcinformation" Text="收款匹配操作记录">                       
                            <ContentCollection>
                                <dx:ContentControl ID="ContentControl1" runat="server">                                
                                    <div style="padding:5px 10px 5px 10px;">
                                        <dx:ASPxGridView ID="gvAssigned" Width="100%" runat="server" 
                                            AutoGenerateColumns="False" ClientInstanceName="gvAssigned" 
                                            KeyFieldName="AccountStatementManualID" 
                                            OnAfterPerformCallback="gvAssigned_AfterPerformCallback" 
                                            OnRowCommand="gvAssigned_RowCommand" >
                                            <Columns>
                                                <dx:GridViewDataColumn Caption="删除" Width="40px" FixedStyle="Left">
                                                    <DataItemTemplate>
                                                        <asp:ImageButton ID="Button1" runat="server" 
                                                        CommandArgument='<%# Eval("AccountStatementManualRecodeID") %>'
                                                            CommandName="delete" ToolTip="删除" Text="删除" ImageUrl="~/Image/del.gif" 
                                                            OnClientClick="return confirm('你确定要删除');" />
                                                    </DataItemTemplate>
                                                    <CellStyle HorizontalAlign="Center">
                                                    </CellStyle>
                                                </dx:GridViewDataColumn>
                                                <dx:GridViewDataCheckColumn Caption="CreditCheck" Width="80px" FixedStyle="Left">
                                                    <DataItemTemplate>
                                                        <asp:CheckBox ID="CheckBox1" runat="server"
                                                        Checked='<%# CreditChecked(Convert.ToString(Eval("CreditCheck"))) %>'
                                                        Enabled="false" />
                                                    </DataItemTemplate>
                                                    <CellStyle HorizontalAlign="Center"></CellStyle>
                                                    <PropertiesCheckEdit DisplayTextChecked="是" DisplayTextUnchecked="否">
                                                    </PropertiesCheckEdit>
                                                </dx:GridViewDataCheckColumn>
                                                <dx:GridViewDataTextColumn Caption="动作类型" FieldName="ActionTypeBC" 
                                                    Width="85px" FixedStyle="Left">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="银行参考号" FieldName="BankReference" 
                                                    Width="140px">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="交易金额" FieldName="TransactionAmount" 
                                                    Width="110px" FixedStyle="Left" UnboundType="Decimal">
                                                    <Settings AutoFilterCondition="GreaterOrEqual" />
                                                    <PropertiesTextEdit DisplayFormatString="{0:N2}" />
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="合同号" FieldName="ContractNo" 
                                                    Width="140px" FixedStyle="Left">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="Order NO." FieldName="SalesOrderNo" 
                                                    Width="140px" FixedStyle="Left">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="匹配金额" FieldName="ApplyAmount"
                                                    Width="110px" FixedStyle="Left" UnboundType="Decimal">
                                                    <Settings AutoFilterCondition="GreaterOrEqual" />
                                                    <PropertiesTextEdit DisplayFormatString="{0:N2}" />
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="收款类型" FieldName="CollectionType" Width="160px">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="匹配人" FieldName="showname" Width="160px">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataDateColumn Caption="匹配时间" FieldName="UPDATEDATE" Width="140px" 
                                                    FixedStyle="Left" UnboundType="DateTime">
                                                    <PropertiesDateEdit DisplayFormatString="{0:yyyy-MM-dd HH:mm}" 
                                                        EditFormat="DateTime">
                                                        <CalendarProperties ClearButtonText="清空" TodayButtonText="今天">
                                                        </CalendarProperties>
                                                    </PropertiesDateEdit>
                                                </dx:GridViewDataDateColumn>
                                                <dx:GridViewDataTextColumn Caption="客户编号" FieldName="CustomerCode" Width="100px">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="客户" FieldName="Customer" Width="160px">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="销售员" FieldName="Salesman" Width="140px">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="CE" FieldName="CEName" Width="140px">
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="订单金额" FieldName="SalesOrderAmountVAT" 
                                                    Width="110px" UnboundType="Decimal">
                                                    <Settings AutoFilterCondition="GreaterOrEqual" />
                                                    <PropertiesTextEdit DisplayFormatString="{0:N2}" />
                                                </dx:GridViewDataTextColumn>
                                                <dx:GridViewDataTextColumn Caption="收款比例(%)" FieldName="APSOA" Width="80px" UnboundType="DateTime">
                                                    <Settings AutoFilterCondition="GreaterOrEqual" />
                                                </dx:GridViewDataTextColumn>
                                            </Columns>
                                            <SettingsPager PageSize="10" Mode="ShowPager">
                                            </SettingsPager>
                                            <SettingsBehavior ColumnResizeMode="Control" AllowSelectByRowClick="True" 
                                                SortMode="DisplayText"></SettingsBehavior>
                                            <Settings ShowFilterRow="True" ShowGroupPanel="True" ShowFilterRowMenu="true"
                                            ShowHorizontalScrollBar="True" VerticalScrollableHeight="22" 
                                                ShowFilterBar="Visible" ShowFooter="True">
                                            </Settings>
                                        </dx:ASPxGridView>
                                    </div>
                                </dx:ContentControl>
                            </ContentCollection>
                        </dx:TabPage>
                    </TabPages>                
                    <Paddings Padding="2px" PaddingLeft="5px" PaddingRight="5px"></Paddings>
                    <ContentStyle>
                        <Border BorderColor="#AECAF0" BorderStyle="Solid" BorderWidth="1px" />
                        <Border BorderColor="#AECAF0" BorderStyle="Solid" BorderWidth="1px"></Border>
                    </ContentStyle>
                </dx:ASPxPageControl>
            </ContentTemplate>
            <Triggers>
                <%--<asp:PostBackTrigger ControlID="tc$btnload" />--%>
            </Triggers>
        </asp:UpdatePanel>
    </form>
</body>
</html>
